WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::Problem Class Reference

#include <core/problem/problem.h>

Inheritance diagram for wolf::Problem:
[legend]

Public Member Functions

virtual ~Problem ()
 
LoaderPtr getLoader ()
 
SizeEigen getDim () const
 
TypeComposite getFrameTypes (StateKeys _keys) const
 
void setTreeManager (TreeManagerBasePtr _gm)
 
TreeManagerBaseConstPtr getTreeManager () const
 
TreeManagerBasePtr getTreeManager ()
 
HardwareBaseConstPtr getHardware () const
 
HardwareBasePtr getHardware ()
 
SensorBasePtr installSensor (YAML::Node _sensor_node, std::vector< std::string > _schema_folders={})
 Factory method to install (create and add) sensors only from a YAML node – Helper method loading parameters from file. More...
 
SensorBasePtr installSensor (const std::string &_params_yaml_filename, std::vector< std::string > _schema_folders)
 Factory method to install (create and add) sensors only from its properties – Helper method loading parameters from file. More...
 
ProcessorBasePtr installProcessor (YAML::Node _processor_node, std::vector< std::string > _schema_folders={})
 Factory method to install (create, and add to sensor) processors only from a YAML node – Helper method loading parameters from file. More...
 
ProcessorBasePtr installProcessor (SensorBasePtr _sensor_corresponding, const std::string &_params_yaml_filename, std::vector< std::string > _schema_folders)
 Factory method to install (create, and add to sensor) processors only from a YAML node – Helper method loading parameters from file. More...
 
ProcessorBasePtr installProcessor (const std::string &_params_yaml_filename, std::vector< std::string > _schema_folders)
 Factory method to install (create, and add to sensor) processors only from its properties. More...
 
SensorBaseConstPtr findSensor (const std::string &_sensor_name) const
 get a sensor pointer by its name More...
 
SensorBasePtr findSensor (const std::string &_sensor_name)
 
ProcessorBaseConstPtr findProcessor (const std::string &_processor_name) const
 get a processor pointer by its name More...
 
ProcessorBasePtr findProcessor (const std::string &_processor_name)
 
std::map< unsigned int, MotionProviderConstPtr > getMotionProviderMap () const
 
std::map< unsigned int, MotionProviderPtr > getMotionProviderMap ()
 
TrajectoryBaseConstPtr getTrajectory () const
 
TrajectoryBasePtr getTrajectory ()
 
bool isFirstFrameSpecified () const
 
bool isFirstFrameApplied () const
 
void setFirstFrameOptions (const YAML::Node &_first_frame_node)
 
void setFirstFrameOptions (const TypeComposite &_first_frame_types, const VectorComposite &_first_frame_values, const PriorComposite &_first_frame_priors)
 
FrameBasePtr applyFirstFrameOptions (const TimeStamp &_ts)
 
FrameBasePtr emplaceFirstFrame (const TimeStamp &_ts, const YAML::Node &_first_frame_node)
 
FrameBasePtr emplaceFirstFrame (const TimeStamp &_ts, const TypeComposite &_first_frame_types, const VectorComposite &_first_frame_values, const PriorComposite &_first_frame_priors)
 
FrameBasePtr emplaceFrame (const TimeStamp &_time_stamp, const TypeComposite &_frame_types, const VectorComposite &_frame_state, const PriorComposite &_frame_priors={})
 Emplace frame from timestamp, types and and state. More...
 
FrameBasePtr emplaceFrame (const TimeStamp &_time_stamp, const StateKeys &_frame_keys)
 Emplace frame from timestamp and keys. More...
 
FrameBasePtr emplaceFrame (const TimeStamp &_time_stamp, const VectorComposite &_frame_state)
 Emplace frame from timestamps and state. More...
 
FrameBasePtr emplaceFrame (const TimeStamp &_time_stamp, const StateKeys &_frame_keys, const Eigen::VectorXd &_frame_state)
 Emplace frame from timestamp and state vector. More...
 
void emplaceStatesToFrame (FrameBasePtr _frame_ptr, const StateKeys &_frame_keys)
 Take a frame and emplace to it the missing states with the frame timestamp. More...
 
void emplaceStatesToFrame (FrameBasePtr _frame_ptr, const VectorComposite &_frame_states)
 Take a frame and emplace to it the missing states. More...
 
FrameBaseConstPtr getLastFrame () const
 
FrameBasePtr getLastFrame ()
 
FrameBaseConstPtr closestFrameToTimeStamp (const TimeStamp &_ts) const
 
FrameBasePtr closestFrameToTimeStamp (const TimeStamp &_ts)
 
bool permitKeyFrame (ProcessorBaseConstPtr _processor_ptr) const
 Give the permission to a processor to create a new key Frame. More...
 
void keyFrameCallback (FrameBasePtr _keyframe_ptr, ProcessorBasePtr _processor_ptr)
 New key frame callback. More...
 
TimeStamp getTimeStamp () const
 
VectorComposite getState (const StateKeys &_keys) const
 
VectorComposite getState (const TimeStamp &_ts, const StateKeys &_keys) const
 
VectorComposite getOdometry (const StateKeys &_keys) const
 
VectorComposite stateZero (TypeComposite _types) const
 
VectorComposite stateZero (const StateKeys &_keys) const
 
MapBaseConstPtr getMap () const
 
MapBasePtr getMap ()
 
void setMap (MapBasePtr)
 
bool saveMap (const std::string &_filename_dot_yaml, const std::string &_map_name="Map automatically saved by Wolf")
 
void perturb (double amplitude=0.01)
 perturb all states states with random noise following an uniform distribution in [ -amplitude, amplitude ] More...
 
void transform (const VectorComposite &_transformation)
 
bool isTransformed () const
 
void resetTransformed ()
 
VectorComposite getTransformation () const
 
void clearCovariance ()
 
void addCovarianceBlock (StateBlockPtr _state1, StateBlockPtr _state2, const Eigen::MatrixXd &_cov)
 
void addCovarianceBlock (StateBlockPtr _state1, const Eigen::MatrixXd &_cov)
 
bool getCovarianceBlock (StateBlockConstPtr _state1, StateBlockConstPtr _state2, Eigen::MatrixXd &_cov, const int _row=0, const int _col=0) const
 
bool getCovarianceBlock (std::map< StateBlockConstPtr, unsigned int > _sb_2_idx, Eigen::MatrixXd &_cov) const
 
bool getCovarianceBlock (StateBlockConstPtr _state, Eigen::MatrixXd &_cov, const int _row_and_col=0) const
 
bool getCovariance (NodeStateBlocksConstPtr _has_states_ptr, const StateKeys &_keys, Eigen::MatrixXd &_covariance) const
 
bool getLastFrameCovariance (const StateKeys &_keys, Eigen::MatrixXd &_covariance) const
 
StateBlockPtr notifyStateBlock (StateBlockPtr _state_ptr, Notification _notif)
 Notifies a new/removed state block to update the solver manager. More...
 
SizeStd getStateBlockNotificationMapSize () const
 Returns the size of the map of state block notification. More...
 
bool getStateBlockNotification (const StateBlockPtr &sb_ptr, Notification &notif) const
 Returns if the state block has been notified, and the notification via parameter. More...
 
FactorBasePtr notifyFactor (FactorBasePtr _factor_ptr, Notification _notif)
 Notifies a new/removed factor to update the solver manager. More...
 
SizeStd getFactorNotificationMapSize () const
 Returns the size of the map of factor notification. More...
 
bool getFactorNotification (const FactorBasePtr &fac_ptr, Notification &notif) const
 Returns if the factor has been notified, and the notification via parameter. More...
 
void print (int depth=4, bool factored_by=false, bool metric=true, bool state_blocks=false, std::ostream &stream=std::cout) const
 print wolf tree More...
 
bool check (int verbose_level=0) const
 
bool check (bool verbose, std::ostream &stream) const
 

Static Public Member Functions

static ProblemPtr create (SizeEigen _dim, const TypeComposite &_frame_types={}, LoaderPtr _loader=nullptr)
 
static ProblemPtr autoSetup (const std::string &_input_yaml_file, std::vector< std::string > _primary_schema_folders={}, LoaderPtr _loader=nullptr, bool _skip_yaml_validation=false)
 
static ProblemPtr autoSetup (YAML::Node _param_node, std::vector< std::string > _primary_schema_folders={}, LoaderPtr _loader=nullptr, bool _skip_yaml_validation=false)
 

Protected Member Functions

void addFrameTypes (const TypeComposite &_types)
 
void addMotionProvider (MotionProviderPtr _processor_motion_ptr)
 Set the processor motion. More...
 
void removeMotionProvider (MotionProviderPtr proc)
 
void consumeNotifications (std::map< StateBlockPtr, Notification > &, std::map< FactorBasePtr, Notification > &)
 Returns the map of state block notification to be handled by the solver (the map stored in this is emptied) More...
 
std::map< StateBlockPtr, Notification > consumeStateBlockNotificationMap ()
 Returns the map of state block notification to be handled by the solver (the map stored in this is emptied) More...
 
std::map< FactorBasePtr, Notification > consumeFactorNotificationMap ()
 Returns the map of factor notification to be handled by the solver (the map stored in this is emptied) More...
 

Protected Attributes

HardwareBasePtr hardware_ptr_
 
TrajectoryBasePtr trajectory_ptr_
 
MapBasePtr map_ptr_
 
TreeManagerBasePtr tree_manager_
 
std::map< unsigned int, MotionProviderPtr > motion_provider_map_
 
SizeEigen dim_
 
TypeComposite frame_types_
 
VectorComposite first_frame_values_
 
PriorComposite first_frame_priors_
 
unsigned int first_frame_status_
 0: not set, 1: set, 2: applied More...
 
std::map< std::pair< StateBlockConstPtr, StateBlockConstPtr >, Eigen::MatrixXd > covariances_
 
std::map< FactorBasePtr, Notification > factor_notification_map_
 
std::map< StateBlockPtr, Notification > state_block_notification_map_
 
std::mutex mut_notifications_
 
std::mutex mut_covariances_
 
std::atomic_bool transformed_
 
VectorComposite transformation_
 
std::mutex mut_transform_
 
LoaderPtr loader_
 

Constructor & Destructor Documentation

◆ ~Problem()

wolf::Problem::~Problem ( )
virtual

Member Function Documentation

◆ addCovarianceBlock() [1/2]

void wolf::Problem::addCovarianceBlock ( StateBlockPtr  _state1,
const Eigen::MatrixXd &  _cov 
)

◆ addCovarianceBlock() [2/2]

void wolf::Problem::addCovarianceBlock ( StateBlockPtr  _state1,
StateBlockPtr  _state2,
const Eigen::MatrixXd &  _cov 
)

◆ addFrameTypes()

void wolf::Problem::addFrameTypes ( const TypeComposite &  _types)
protected

◆ addMotionProvider()

void wolf::Problem::addMotionProvider ( MotionProviderPtr  _processor_motion_ptr)
protected

Set the processor motion.

Add a new processor of type is motion to the processor is motion list.

◆ applyFirstFrameOptions()

FrameBasePtr wolf::Problem::applyFirstFrameOptions ( const TimeStamp &  _ts)

◆ autoSetup() [1/2]

ProblemPtr wolf::Problem::autoSetup ( const std::string &  _input_yaml_file,
std::vector< std::string >  _primary_schema_folders = {},
LoaderPtr  _loader = nullptr,
bool  _skip_yaml_validation = false 
)
static

◆ autoSetup() [2/2]

ProblemPtr wolf::Problem::autoSetup ( YAML::Node  _param_node,
std::vector< std::string >  _primary_schema_folders = {},
LoaderPtr  _loader = nullptr,
bool  _skip_yaml_validation = false 
)
static

◆ check() [1/2]

bool wolf::Problem::check ( bool  verbose,
std::ostream &  stream 
) const

◆ check() [2/2]

bool wolf::Problem::check ( int  verbose_level = 0) const

◆ clearCovariance()

void wolf::Problem::clearCovariance ( )

◆ closestFrameToTimeStamp() [1/2]

FrameBasePtr wolf::Problem::closestFrameToTimeStamp ( const TimeStamp &  _ts)

◆ closestFrameToTimeStamp() [2/2]

FrameBaseConstPtr wolf::Problem::closestFrameToTimeStamp ( const TimeStamp &  _ts) const

◆ consumeFactorNotificationMap()

std::map< FactorBasePtr, Notification > wolf::Problem::consumeFactorNotificationMap ( )
protected

Returns the map of factor notification to be handled by the solver (the map stored in this is emptied)

◆ consumeNotifications()

void wolf::Problem::consumeNotifications ( std::map< StateBlockPtr, Notification > &  _sb_notification_map,
std::map< FactorBasePtr, Notification > &  _fac_notification_map 
)
inlineprotected

Returns the map of state block notification to be handled by the solver (the map stored in this is emptied)

◆ consumeStateBlockNotificationMap()

std::map< StateBlockPtr, Notification > wolf::Problem::consumeStateBlockNotificationMap ( )
protected

Returns the map of state block notification to be handled by the solver (the map stored in this is emptied)

◆ create()

ProblemPtr wolf::Problem::create ( SizeEigen  _dim,
const TypeComposite &  _frame_types = {},
LoaderPtr  _loader = nullptr 
)
static

◆ emplaceFirstFrame() [1/2]

FrameBasePtr wolf::Problem::emplaceFirstFrame ( const TimeStamp &  _ts,
const TypeComposite &  _first_frame_types,
const VectorComposite &  _first_frame_values,
const PriorComposite &  _first_frame_priors 
)

◆ emplaceFirstFrame() [2/2]

FrameBasePtr wolf::Problem::emplaceFirstFrame ( const TimeStamp &  _ts,
const YAML::Node &  _first_frame_node 
)

◆ emplaceFrame() [1/4]

FrameBasePtr wolf::Problem::emplaceFrame ( const TimeStamp &  _time_stamp,
const StateKeys &  _frame_keys 
)

Emplace frame from timestamp and keys.

Parameters
_time_stampTime stamp of the frame
_frame_keysString containing the keys of the desired frame. Empty means all keys available.
  • The frame_types are taken from Problem
  • The states are taken from Problem

This acts as a Frame factory, but also takes care to update related lists in WolfProblem:

  • Create a Frame
  • Add it to Trajectory
  • If it is key-frame, update state-block lists in Problem

◆ emplaceFrame() [2/4]

FrameBasePtr wolf::Problem::emplaceFrame ( const TimeStamp &  _time_stamp,
const StateKeys &  _frame_keys,
const Eigen::VectorXd &  _frame_state 
)

Emplace frame from timestamp and state vector.

Parameters
_time_stampTime stamp of the frame
_frame_keysString containing the keys of the desired frame. Empty means all keys available.
_frame_stateState vector; must match the size and format of the chosen frame state_keys
  • The frame_types are taken from Problem

This acts as a Frame factory, but also takes care to update related lists in WolfProblem:

  • Create a Frame
  • Add it to Trajectory
  • If it is key-frame, update state-block lists in Problem

◆ emplaceFrame() [3/4]

FrameBasePtr wolf::Problem::emplaceFrame ( const TimeStamp &  _time_stamp,
const TypeComposite &  _frame_types,
const VectorComposite &  _frame_state,
const PriorComposite &  _frame_priors = {} 
)

Emplace frame from timestamp, types and and state.

Parameters
_time_stampTime stamp of the frame
_frame_typesTypeComposite indicating the types of each key.
_frame_stateVectorComposite with the states
_frame_priorsPriorComposite with the priors on the states (not all keys required)

This acts as a Frame factory, but also takes care to update related lists in WolfProblem:

  • Create a Frame
  • Add it to Trajectory
  • If it is key-frame, update state-block lists in Problem

◆ emplaceFrame() [4/4]

FrameBasePtr wolf::Problem::emplaceFrame ( const TimeStamp &  _time_stamp,
const VectorComposite &  _frame_state 
)

Emplace frame from timestamps and state.

Parameters
_time_stampTime stamp of the frame
_frame_stateState; must be part of the problem's frame state_keys
  • The frame_types are taken from Problem

This acts as a Frame factory, but also takes care to update related lists in WolfProblem:

  • Create a Frame
  • Add it to Trajectory
  • If it is key-frame, update state-block lists in Problem

◆ emplaceStatesToFrame() [1/2]

void wolf::Problem::emplaceStatesToFrame ( FrameBasePtr  _frame_ptr,
const StateKeys &  _frame_keys 
)

Take a frame and emplace to it the missing states with the frame timestamp.

Parameters
_frame_ptrFrame to which states have to be emplaced
_frame_keysthe keys that the frame is requested to have.
  • The frame_types are taken from Problem.
  • Only the missing keys are emplaced.
  • The states are taken from Problem::getState(_frame_ptr->getTimeStamp(), _frame_keys)
  • The states are emplaced to the frame as unfixed.

◆ emplaceStatesToFrame() [2/2]

void wolf::Problem::emplaceStatesToFrame ( FrameBasePtr  _frame_ptr,
const VectorComposite &  _frame_states 
)

Take a frame and emplace to it the missing states.

Parameters
_frame_ptrFrame to which states have to be emplaced
_frame_statesthe states vectors to be added to the frame
  • The frame_types are taken from Problem.
  • Only the missing keys are emplaced.
  • The states are emplaced to the frame as unfixed.

◆ findProcessor() [1/2]

ProcessorBasePtr wolf::Problem::findProcessor ( const std::string &  _processor_name)

◆ findProcessor() [2/2]

ProcessorBaseConstPtr wolf::Problem::findProcessor ( const std::string &  _processor_name) const

get a processor pointer by its name

Parameters
_processor_nameThe processor name, as it was installed with installProcessor()

◆ findSensor() [1/2]

SensorBasePtr wolf::Problem::findSensor ( const std::string &  _sensor_name)

◆ findSensor() [2/2]

SensorBaseConstPtr wolf::Problem::findSensor ( const std::string &  _sensor_name) const

get a sensor pointer by its name

Parameters
_sensor_nameThe sensor name, as it was installed with installSensor()

◆ getCovariance()

bool wolf::Problem::getCovariance ( NodeStateBlocksConstPtr  _has_states_ptr,
const StateKeys &  _keys,
Eigen::MatrixXd &  _covariance 
) const

◆ getCovarianceBlock() [1/3]

bool wolf::Problem::getCovarianceBlock ( StateBlockConstPtr  _state,
Eigen::MatrixXd &  _cov,
const int  _row_and_col = 0 
) const

◆ getCovarianceBlock() [2/3]

bool wolf::Problem::getCovarianceBlock ( StateBlockConstPtr  _state1,
StateBlockConstPtr  _state2,
Eigen::MatrixXd &  _cov,
const int  _row = 0,
const int  _col = 0 
) const

◆ getCovarianceBlock() [3/3]

bool wolf::Problem::getCovarianceBlock ( std::map< StateBlockConstPtr, unsigned int >  _sb_2_idx,
Eigen::MatrixXd &  _cov 
) const

◆ getDim()

SizeEigen wolf::Problem::getDim ( ) const

◆ getFactorNotification()

bool wolf::Problem::getFactorNotification ( const FactorBasePtr &  fac_ptr,
Notification &  notif 
) const

Returns if the factor has been notified, and the notification via parameter.

◆ getFactorNotificationMapSize()

wolf::SizeStd wolf::Problem::getFactorNotificationMapSize ( ) const
inline

Returns the size of the map of factor notification.

◆ getFrameTypes()

TypeComposite wolf::Problem::getFrameTypes ( StateKeys  _keys) const

◆ getHardware() [1/2]

HardwareBasePtr wolf::Problem::getHardware ( )

◆ getHardware() [2/2]

HardwareBaseConstPtr wolf::Problem::getHardware ( ) const

◆ getLastFrame() [1/2]

FrameBasePtr wolf::Problem::getLastFrame ( )

◆ getLastFrame() [2/2]

FrameBaseConstPtr wolf::Problem::getLastFrame ( ) const

◆ getLastFrameCovariance()

bool wolf::Problem::getLastFrameCovariance ( const StateKeys &  _keys,
Eigen::MatrixXd &  _covariance 
) const

◆ getLoader()

LoaderPtr wolf::Problem::getLoader ( )
inline

◆ getMap() [1/2]

MapBasePtr wolf::Problem::getMap ( )

◆ getMap() [2/2]

MapBaseConstPtr wolf::Problem::getMap ( ) const

◆ getMotionProviderMap() [1/2]

std::map< unsigned int, MotionProviderPtr > wolf::Problem::getMotionProviderMap ( )
inline

◆ getMotionProviderMap() [2/2]

std::map< unsigned int, MotionProviderConstPtr > wolf::Problem::getMotionProviderMap ( ) const
inline

◆ getOdometry()

VectorComposite wolf::Problem::getOdometry ( const StateKeys &  _keys) const

◆ getState() [1/2]

VectorComposite wolf::Problem::getState ( const StateKeys &  _keys) const

◆ getState() [2/2]

VectorComposite wolf::Problem::getState ( const TimeStamp &  _ts,
const StateKeys &  _keys 
) const

◆ getStateBlockNotification()

bool wolf::Problem::getStateBlockNotification ( const StateBlockPtr &  sb_ptr,
Notification &  notif 
) const

Returns if the state block has been notified, and the notification via parameter.

◆ getStateBlockNotificationMapSize()

SizeStd wolf::Problem::getStateBlockNotificationMapSize ( ) const
inline

Returns the size of the map of state block notification.

◆ getTimeStamp()

TimeStamp wolf::Problem::getTimeStamp ( ) const

◆ getTrajectory() [1/2]

TrajectoryBasePtr wolf::Problem::getTrajectory ( )

◆ getTrajectory() [2/2]

TrajectoryBaseConstPtr wolf::Problem::getTrajectory ( ) const

◆ getTransformation()

VectorComposite wolf::Problem::getTransformation ( ) const

◆ getTreeManager() [1/2]

TreeManagerBasePtr wolf::Problem::getTreeManager ( )
inline

◆ getTreeManager() [2/2]

TreeManagerBaseConstPtr wolf::Problem::getTreeManager ( ) const
inline

◆ installProcessor() [1/3]

ProcessorBasePtr wolf::Problem::installProcessor ( const std::string &  _params_yaml_filename,
std::vector< std::string >  _schema_folders 
)

Factory method to install (create, and add to sensor) processors only from its properties.

This method creates a Processor, and adds it to the specified sensor's list of processors

This method is a helper wrapper around the version accepting a sensor pointer instead of a sensor name.

Parameters
_params_yaml_filenamename of formatted yaml file defining the processor parameters.
_schema_foldersa vector of paths where the schema files (to validate the YAML file) are placed

◆ installProcessor() [2/3]

ProcessorBasePtr wolf::Problem::installProcessor ( SensorBasePtr  _sensor_corresponding,
const std::string &  _params_yaml_filename,
std::vector< std::string >  _schema_folders 
)

Factory method to install (create, and add to sensor) processors only from a YAML node – Helper method loading parameters from file.

Parameters
_sensor_correspondingcorresponding sensor pointer, used to bind the processor to the particular instance of the sensor
_params_yaml_filenamename of formatted yaml file defining the processor parameters.
_schema_foldersa vector of paths where the schema files (to validate the YAML node) are placed, if empty the node is not validated.

◆ installProcessor() [3/3]

ProcessorBasePtr wolf::Problem::installProcessor ( YAML::Node  _processor_node,
std::vector< std::string >  _schema_folders = {} 
)

Factory method to install (create, and add to sensor) processors only from a YAML node – Helper method loading parameters from file.

Parameters
_processor_nodeYAML node containing all necessary information to call the factory and create the processor.
_schema_foldersa vector of paths where the schema files (to validate the YAML node) are placed, if empty the node is not validated.

◆ installSensor() [1/2]

SensorBasePtr wolf::Problem::installSensor ( const std::string &  _params_yaml_filename,
std::vector< std::string >  _schema_folders 
)

Factory method to install (create and add) sensors only from its properties – Helper method loading parameters from file.

Parameters
_params_yaml_filenamethe name of a file containing the parameters in a format compatible with the intrinsics creator registered in FactoryParamsSensor under the key _sen_type.
_schema_foldersa vector of paths where the schema files (to validate the YAML file) are placed

◆ installSensor() [2/2]

SensorBasePtr wolf::Problem::installSensor ( YAML::Node  _sensor_node,
std::vector< std::string >  _schema_folders = {} 
)

Factory method to install (create and add) sensors only from a YAML node – Helper method loading parameters from file.

Parameters
_sensor_nodeYAML node containing all necessary information to call the factory and create the sensor.
_schema_foldersa vector of paths where the schema files (to validate the YAML node) are placed, if empty the node is not validated.

◆ isFirstFrameApplied()

bool wolf::Problem::isFirstFrameApplied ( ) const
inline

◆ isFirstFrameSpecified()

bool wolf::Problem::isFirstFrameSpecified ( ) const
inline

◆ isTransformed()

bool wolf::Problem::isTransformed ( ) const

◆ keyFrameCallback()

void wolf::Problem::keyFrameCallback ( FrameBasePtr  _keyframe_ptr,
ProcessorBasePtr  _processor_ptr 
)

New key frame callback.

New key frame callback: It should be called by any processor that creates a new key frame. It calls the keyFrameCallback of the rest of processors.

◆ notifyFactor()

FactorBasePtr wolf::Problem::notifyFactor ( FactorBasePtr  _factor_ptr,
Notification  _notif 
)

Notifies a new/removed factor to update the solver manager.

◆ notifyStateBlock()

StateBlockPtr wolf::Problem::notifyStateBlock ( StateBlockPtr  _state_ptr,
Notification  _notif 
)

Notifies a new/removed state block to update the solver manager.

◆ permitKeyFrame()

bool wolf::Problem::permitKeyFrame ( ProcessorBaseConstPtr  _processor_ptr) const

Give the permission to a processor to create a new key Frame.

This should implement a black list of processors that have forbidden key frame creation.

  • This decision is made at problem level, not at processor configuration level.
  • Therefore, if you want to permanently configure a processor for not creating key frames, see Processor::voting_active_ and its accessors.

◆ perturb()

void wolf::Problem::perturb ( double  amplitude = 0.01)

perturb all states states with random noise following an uniform distribution in [ -amplitude, amplitude ]

◆ print()

void wolf::Problem::print ( int  depth = 4,
bool  factored_by = false,
bool  metric = true,
bool  state_blocks = false,
std::ostream &  stream = std::cout 
) const

print wolf tree

Parameters
depth: levels to show ( 0: H, T, M : 1: H:S, T:F, M:L ; 2: H:S:p, T:F:C ; 3: T:F:C:f ; 4: T:F:C:f:c )
factored_by: show factors pointing to F, C, f and L.
metric: show metric info (status, time stamps, state vectors, measurements)
state_blocks: show state blocks

◆ removeMotionProvider()

void wolf::Problem::removeMotionProvider ( MotionProviderPtr  proc)
protected

◆ resetTransformed()

void wolf::Problem::resetTransformed ( )

◆ saveMap()

bool wolf::Problem::saveMap ( const std::string &  _filename_dot_yaml,
const std::string &  _map_name = "Map automatically saved by Wolf" 
)

◆ setFirstFrameOptions() [1/2]

void wolf::Problem::setFirstFrameOptions ( const TypeComposite &  _first_frame_types,
const VectorComposite &  _first_frame_values,
const PriorComposite &  _first_frame_priors 
)

◆ setFirstFrameOptions() [2/2]

void wolf::Problem::setFirstFrameOptions ( const YAML::Node &  _first_frame_node)

◆ setMap()

void wolf::Problem::setMap ( MapBasePtr  _map_ptr)

◆ setTreeManager()

void wolf::Problem::setTreeManager ( TreeManagerBasePtr  _gm)

◆ stateZero() [1/2]

VectorComposite wolf::Problem::stateZero ( const StateKeys &  _keys) const

◆ stateZero() [2/2]

VectorComposite wolf::Problem::stateZero ( TypeComposite  _types) const

◆ transform()

void wolf::Problem::transform ( const VectorComposite &  _transformation)

Member Data Documentation

◆ covariances_

std::map<std::pair<StateBlockConstPtr, StateBlockConstPtr>, Eigen::MatrixXd> wolf::Problem::covariances_
protected

◆ dim_

SizeEigen wolf::Problem::dim_
protected

◆ factor_notification_map_

std::map<FactorBasePtr, Notification> wolf::Problem::factor_notification_map_
protected

◆ first_frame_priors_

PriorComposite wolf::Problem::first_frame_priors_
protected

◆ first_frame_status_

unsigned int wolf::Problem::first_frame_status_
protected

0: not set, 1: set, 2: applied

◆ first_frame_values_

VectorComposite wolf::Problem::first_frame_values_
protected

◆ frame_types_

TypeComposite wolf::Problem::frame_types_
protected

◆ hardware_ptr_

HardwareBasePtr wolf::Problem::hardware_ptr_
protected

◆ loader_

LoaderPtr wolf::Problem::loader_
protected

◆ map_ptr_

MapBasePtr wolf::Problem::map_ptr_
protected

◆ motion_provider_map_

std::map<unsigned int, MotionProviderPtr> wolf::Problem::motion_provider_map_
protected

◆ mut_covariances_

std::mutex wolf::Problem::mut_covariances_
mutableprotected

◆ mut_notifications_

std::mutex wolf::Problem::mut_notifications_
mutableprotected

◆ mut_transform_

std::mutex wolf::Problem::mut_transform_
mutableprotected

◆ state_block_notification_map_

std::map<StateBlockPtr, Notification> wolf::Problem::state_block_notification_map_
protected

◆ trajectory_ptr_

TrajectoryBasePtr wolf::Problem::trajectory_ptr_
protected

◆ transformation_

VectorComposite wolf::Problem::transformation_
protected

◆ transformed_

std::atomic_bool wolf::Problem::transformed_
protected

◆ tree_manager_

TreeManagerBasePtr wolf::Problem::tree_manager_
protected

The documentation for this class was generated from the following files: